﻿using Core;
using Core.Domain.Companys;
using System;
using System.Collections.Generic;

namespace Services.Companys
{
    /// <summary>
    /// 公司服务接口
    /// </summary>
    public partial interface ICompanyService
    {
        /// <summary>
        /// 删除公司
        /// </summary>
        /// <param name="entity"></param>
        void DeleteCompany(Company entity);

        /// <summary>
        /// 新增公司
        /// </summary>
        /// <param name="entity"></param>
        void InsertCompany(Company entity);

        /// <summary>
        /// 更新公司
        /// </summary>
        /// <param name="entity"></param>
        void UpdateCompany(Company entity);

        /// <summary>
        /// 根据主键获取公司实体信息
        /// </summary>
        /// <param name="companyId"></param>
        /// <returns></returns>
        Company GetCompanyById(int companyId);

        /// <summary>
        /// 根据主键集合获取公司实体信息
        /// </summary>
        /// <param name="companyIds"></param>
        /// <returns></returns>
        IList<Company> GetCompanyByIds(int[] companyIds);

        /// <summary>
        /// 获取公司所有信息
        /// </summary>
        /// <param name="active"></param>
        /// <param name="deleted"></param>
        /// <returns></returns>
        IList<Company> GetCompanys(bool? active = true, bool? deleted = false);

        /// <summary>
        /// 获取公司所有信息（分页）
        /// </summary>
        /// <returns></returns>
        IPagedList<Company> GetCompanys(string name = "", string url = "",
            int scaleId = 0, int cityId = 0,
            bool? active = true, bool? deleted = false,
            List<int> values = null,
            CompanySortingEnum sort = CompanySortingEnum.CreateDown, int pageIndex = 0, int pageSize = int.MaxValue);
    }
}
